#ifndef DEBUGWIDGET_H
#define DEBUGWIDGET_H

#include "CommonContainer.h"
#include <QPushButton>
#include <QVBoxLayout>
#include <QWidget>

class DebugWidget : public CommonContainer
{
    Q_OBJECT

public:
    // 调试按钮类型枚举
    enum DebugButtonType {
        BackBlow = 0,           // 后吹
        BGun = 1,              // B枪
        ReturnDrySlight = 2,   // 返干—轻微
        ReturnDrySevere = 3,   // 返干—重度
        TopSpray = 4,          // 顶喷
        DoubleSlag = 5         // 双渣
    };

    explicit DebugWidget(QWidget *parent = nullptr);
    ~DebugWidget();

signals:
    void buttonClicked(DebugButtonType buttonType, bool isPressed);

private slots:
    void onBackBlowClicked();
    void onBGunClicked();
    void onReturnDrySlightClicked();
    void onReturnDrySevereClicked();
    void onTopSprayClicked();
    void onDoubleSlagClicked();

private:
    void setupUI();
    void setupConnections();
    void setButtonPressed(QPushButton* button, bool pressed);
    
    // 按钮
    QPushButton *m_backBlowBtn;
    QPushButton *m_bGunBtn;
    QPushButton *m_returnDrySlightBtn;
    QPushButton *m_returnDrySevereBtn;
    QPushButton *m_topSprayBtn;
    QPushButton *m_doubleSlagBtn;
    
    // 布局
    QVBoxLayout *m_buttonLayout;
    
    // 按钮状态
    bool m_backBlowPressed;
    bool m_bGunPressed;
    bool m_returnDrySlightPressed;
    bool m_returnDrySeverePressed;
    bool m_topSprayPressed;
    bool m_doubleSlagPressed;
};

#endif // DEBUGWIDGET_H
